An automated teller machine (ATM) in financial institution is mounted with a device for identifying a paper medium (such as paper currency). Template data for identifying a paper medium is stored in a storage part of the device for identifying the paper medium. Once the paper medium is loaded into the device for identifying the paper medium, an image data acquiring part of the device for identifying the paper medium is configured to read the paper medium optically, acquire grayscale image data of the paper medium to be identified, perform a match between the template and a detection result based on the obtained pattern and grayscale value of the grayscale image of the paper medium to be identified, and thus determine a kind and authenticity of the paper medium (currency).
If the device for identifying the paper medium has been used for a long time, a fault may occur in a certain light emitting element of the contact image sensor (CIS), or a transparent piece of the CIS may be dirty. Because the CIS performs a line scan, a black line with gray value approximate to 0 will occur on the reflected image or transmitted image acquired by the image sensor (which black line is referred to as “faulty line” hereinafter, and this case is referred to as “CIS faulty line phenomenon”), when a fault occurs in a certain light emitting element of the CIS or the transparent piece of the CIS is dirty. The position of a faulty light emitting element or dirty transparent piece of the CIS is random, so the position of the faulty line in the image of the paper medium to be detected is random. In this case, if the existing identification processes are performed, the acceptance rate of the device for identifying the paper medium will be decreased, the performance of the device and the customer experience will be affected significantly, and thus the marketing and application of the device will be obstructed.
Thus, it is necessary to propose a technique for effectively solving the problem of the CIS faulty line in the device for identifying the paper medium.